#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Generic;
using Cephei.QL.Times;
namespace Cephei.QL
{
     // <summary> 
	// ! This class encapsulate the interest rate compounding algebra. It manages day-counting conventions, compounding conventions, conversion between different conventions, discount/compound factor calculations, and implied/equivalent rate calculations.  \test Converted rates are checked against known good results
	// </summary>
    [Guid ("98426A9A-090B-49d8-A102-084F994D7BCA"),ComVisible(true)]
	public interface IInterestRate 
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        
		 Cephei.QL.IInterestRate EquivalentRate(Cephei.QL.Times.IDayCounter resultDC, QL.CompoundingEnum comp, QL.Times.FrequencyEnum freq, DateTime d1, DateTime d2, Microsoft.FSharp.Core.FSharpOption<DateTime> refStart, Microsoft.FSharp.Core.FSharpOption<DateTime> refEnd);
        
		 Cephei.QL.IInterestRate EquivalentRate(QL.CompoundingEnum comp, QL.Times.FrequencyEnum freq, Double t);
        
		 Cephei.QL.IInterestRate ImpliedRate(Double compound, Cephei.QL.Times.IDayCounter resultDC, QL.CompoundingEnum comp, QL.Times.FrequencyEnum freq, DateTime d1, DateTime d2, Microsoft.FSharp.Core.FSharpOption<DateTime> refStart, Microsoft.FSharp.Core.FSharpOption<DateTime> refEnd);
        
		 Double CompoundFactor(DateTime d1, DateTime d2, Microsoft.FSharp.Core.FSharpOption<DateTime> refStart, Microsoft.FSharp.Core.FSharpOption<DateTime> refEnd);
        
		 Double CompoundFactor(Double t);
        
		 QL.CompoundingEnum Compounding {get;}
        
		 Cephei.QL.Times.IDayCounter DayCounter {get;}
        
		 Double DiscountFactor(DateTime d1, DateTime d2, Microsoft.FSharp.Core.FSharpOption<DateTime> refStart, Microsoft.FSharp.Core.FSharpOption<DateTime> refEnd);
        
		 Double DiscountFactor(Double t);
        
		 Cephei.QL.IInterestRate ImpliedRate(Double compound, Cephei.QL.Times.IDayCounter resultDC, QL.CompoundingEnum comp, QL.Times.FrequencyEnum freq, Double t);
        
		 QL.Times.FrequencyEnum Frequency {get;}
        
		 Double Rate {get;}
    }

    // <summary> 
	// ! This class encapsulate the interest rate compounding algebra. It manages day-counting conventions, compounding conventions, conversion between different conventions, discount/compound factor calculations, and implied/equivalent rate calculations.  \test Converted rates are checked against known good results Factory
	// </summary>
   	[ComVisible(true)]
    public interface IInterestRate_Factory // : Collection_Factory<IInterestRate, ICell<IInterestRate>>
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary>
        /// Create a hybrid Vector of IInterestRate, with event notification of changes
        /// </summary>
        /// <returns>a new Vector&ltIInterestRate&gt</returns>
        IVector<IInterestRate> CreateVector();
        /// <summary>
        /// Create a hybrid Vector of ICell of IInterestRate, with event notification of changes
        /// </summary>
        /// <returns>a new ICell&ltIVector&ltI&ltIInterestRate&gt&gt&gt</returns>
        Generic.ICell<IVector<Generic.ICell<IInterestRate>>> CreateCellVector();
        IVector<IInterestRate> CreateVector(IEnumerable<IInterestRate> source);
        Generic.ICell<IVector<Generic.ICell<IInterestRate>>> CreateCellVector(IEnumerable<Generic.ICell<IInterestRate>> source);
        
	    IInterestRate Create (Double r, Cephei.QL.Times.IDayCounter dc, QL.CompoundingEnum comp, QL.Times.FrequencyEnum freq);
        // <summary> 
		// constructors
		// </summary>
	    IInterestRate Create ();
    }
}

